package com.luguokong.pet_rescue.mapper;

import com.luguokong.pet_rescue.pojo.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentMapper {
    public int insertComment(Comment comment);
    public int deleteCommentById(int cmt_id);
    public List<Comment> selectCommentAllByReplyId(int reply_id);
    public List<Comment> selectCommentAll();

    @Select("select * from comments limit #{pageNum},#{pageSize}")
    public List<Comment> selectCommentAllByPageNumByPageSize(int pageNum, int pageSize);

    @Select("select count(*) from comments")
    public int selectDataCount();

    public int deleteCommentByCmtIdArray(int [] cmtIdArr);
}
